import 'package:equatable/equatable.dart';

part 'errors.dart';

abstract class ValidateSigningInPassword {
  SigningInPasswordValidationError? call({
    required String password,
  });
}

class ValidateSigningInPasswordImpl implements ValidateSigningInPassword {
  const ValidateSigningInPasswordImpl();

  @override
  SigningInPasswordValidationError? call({
    required String password,
  }) {
    if (password.isEmpty) {
      return const EmptyPasswordSigningInPasswordValidationError();
    }

    return null;
  }
}
